const path = require('path');
const {merge} = require('webpack-merge');
const webpack = require('webpack');

const webpackDevConfig = require('./webpack.main.dev');

module.exports = merge(webpackDevConfig, {
  devtool: 'none',
  mode: 'production',
  target: 'electron-main',
  output: {
    path: path.join(__dirname, '../dist/main'),
    filename: 'main.prod.js'
  },
  plugins: [
    new webpack.EnvironmentPlugin({
      NODE_ENV: 'production'
    })
  ]
});